home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2000 July / macformat-092.iso / Dreamweaver 3 / Extending / c_files / MMInfo.h < prev    next >
Encoding:
Text File  |  1999-12-01  |  1.8 KB  |  59 lines

  1. // 
  2. // Copyright (c) 1999 Macromedia, inc.  All Rights Reserved.
  3. // ---------------------------------------------------------
  4. //
  5. // MMInfo.h
  6. //
  7.  
  8. #ifndef _MMINFO_H_
  9. #define _MMINFO_H_
  10.  
  11. #ifdef _WIN32    // Windows
  12.     #define MMNOTES_EXPORT    __declspec( dllexport )
  13. #else    // Codewarrior/Mac
  14.     #define MMNOTES_EXPORT    extern
  15.     typedef int BOOL;
  16.     #define TRUE true
  17.     #define FALSE false
  18.  
  19.     #ifdef __cplusplus
  20.     extern "C" {
  21.     #endif
  22.  
  23.     #pragma export on    
  24. #endif
  25.  
  26. typedef int FileHandle;
  27. typedef char InfoKey[64];
  28.  
  29. struct InfoPrefs
  30. {
  31.     BOOL bUseDesignNotes;
  32.     BOOL bUploadDesignNotes;
  33. };
  34.  
  35. // Declare the external entry point and linkage
  36. MMNOTES_EXPORT FileHandle OpenNotesFile( const char* mediaFilePath, BOOL bForce=FALSE );
  37. MMNOTES_EXPORT void CloseNotesFile( FileHandle infoHandle );
  38. MMNOTES_EXPORT BOOL SetNote( FileHandle infoHandle, const InfoKey key, const char* value );
  39. MMNOTES_EXPORT BOOL RemoveNote( FileHandle infoHandle, const InfoKey key );
  40. MMNOTES_EXPORT int GetNoteLength( FileHandle infoHandle, const InfoKey key );
  41. MMNOTES_EXPORT BOOL GetNote( FileHandle infoHandle, const InfoKey key, char* valueBuf, int valueBufMaxLen );
  42. MMNOTES_EXPORT int     GetNotesKeyCount( FileHandle infoHandle );
  43. MMNOTES_EXPORT BOOL GetNotesKeys( FileHandle infoHandle, InfoKey* keyList, int keyListMaxLen );
  44. MMNOTES_EXPORT BOOL GetSiteRootForFile( const char* mediaFilePath, char* siteRootBuf, int siteRootBufMaxLen, InfoPrefs* prefs=NULL );
  45. MMNOTES_EXPORT BOOL GetVersionNum( char* versionNumBuf, int versionNumBufMaxLen );
  46. MMNOTES_EXPORT BOOL GetVersionName( char* versionNameBuf, int versionNameBufMaxLen );
  47. MMNOTES_EXPORT BOOL FilePathToLocalURL( const char* filePath, char* localURL, int localURLMaxLen );
  48. MMNOTES_EXPORT BOOL LocalURLToFilePath( const char* localURL, char* filePath, int filePathMaxLen );
  49.  
  50. #ifndef _WIN32
  51.     #pragma export off
  52.  
  53.     #ifdef __cplusplus
  54.     }
  55.     #endif
  56. #endif
  57.  
  58. #endif    /* _MMINFO_H_ */
  59.